Also fix navigation links on current-with-oldid view.
* (bug 2620) Return to prior behavior for some more things (such as
subpage parent links) on current-diff view.
+* (bug 2618) Fix regression from another fix; show initial preview for
+ categories only if the page does not exist.
=== Caveats ===
} else if ( $this->diff ) {
$this->editForm( 'diff' );
} else { # First time through
- if( $wgUser->getOption('previewonfirst')
- or $this->mTitle->getNamespace() == NS_CATEGORY ) {
+ if( $this->previewOnOpen() ) {
$this->editForm( 'preview', true );
} else {
$this->extractMetaDataFromArticle () ;
}
}
}
+
+ /**
+ * Return true if this page should be previewed when the edit form
+ * is initially opened.
+ * @return bool
+ * @access private
+ */
+ function previewOnOpen() {
+ global $wgUser;
+ return $wgUser->getOption( 'previewonfirst' ) ||
+ ( $this->mTitle->getNamespace() == NS_CATEGORY &&
+ !$this->mTitle->exists() );
+ }
/**
* @todo document